package org.flowers.unbeaten.base.constant;

/**
 * @description 常量
 * @author RyanWang
 * @date 2021-07-16 15:07:01
 * @version 1.0
 */
public class Constants {

    /**
     * redis的token相关
     */
    public static final String ACCESS_TOKEN = "authorization";
    public static final String PERMISSIONS_KEY = "permissions-key";
    public static final String USER_ID_KEY = "user-id-key";
    public static final String USER_NAME_KEY = "user-name-key";
    public static final String ROLES_KEY = "roles-key";

    /**
     * 未删除值
     */
    public static final Integer DATA_NOT_DELETED = 1;

    /**
     * 数据库类型
     */
    public static final String DB_TYPE_MYSQL = "mysql";
    public static final String DB_TYPE_ORACLE = "oracle";
    public static final String DB_TYPE_SQL_SERVER = "sqlServer";

    /**
     * 定时任务状态
     */
    public static final Integer SCHEDULER_STATUS_NORMAL = 0;
    public static final Integer SCHEDULER_STATUS_PAUSE = 1;

    /**
     * 数据范围类型 1:所有/2:自定义/3:本部门及一下/4:仅本部门/5:自己
     */
    public static final Integer DATA_SCOPE_ALL = 1;
    public static final Integer DATA_SCOPE_CUSTOM = 2;
    public static final Integer DATA_SCOPE_DEPT_AND_CHILD = 3;
    public static final Integer DATA_SCOPE_DEPT = 4;
    public static final Integer DATA_SCOPE_DEPT_SELF = 5;

    /**
     * 盐值长度
     */
    public static final int SALT_SIZE = 9;

    /**
     * 加密算法名称
     */
    public final static String HASH_ALGORITHM_NAME = "SHA-1";

    /**
     * 哈希迭代次数
     */
    public final static Integer HASH_ITERATIONS = 16;

    /**
     * 登录接口名
     */
    public final static String LOGIN_INTERFACE_NAME = "login";

}
